package org.zhs.flowable.demo.flowable.listener;

import org.flowable.task.service.delegate.DelegateTask;
import org.flowable.task.service.delegate.TaskListener;

/**
 * @Author: zhs
 * @Date: 2024/4/15 12:24
 * @Version: 1.0
 * @Description:
 */
public class MyListener_01 implements TaskListener {
    @Override
    public void notify(DelegateTask delegateTask) {
        //输出触发的事件名称
        System.out.println("监听器触发" + delegateTask.getEventName());

        //是create时
        if (TaskListener.EVENTNAME_CREATE.equals(delegateTask.getEventName())) {
            //
            delegateTask.setAssignee("test2");
        }

    }
}
